home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_200 / 205_01 / tee.doc < prev    next >
Text File  |  1980-01-01  |  1KB  |  35 lines

  1. -------------------------------------------------------------------------------
  2.  TEE
  3. -------------------------------------------------------------------------------
  4.  
  5. Format:
  6.  
  7.      tee filename
  8.  
  9. Purpose:
  10.  
  11. TEE is a text filter that passes the standard input to a designated file (or 
  12. MS-DOS device) in addition to passing it unchanged to the standard output.
  13.  
  14. Examples:
  15.  
  16. Copy the file named original to two new files, newfile1 and newfile2.
  17.  
  18.      tee newfile1 <original >newfile2
  19.  
  20. Echo what is typed at the keyboard onto the screen, while saving the characters
  21. to a file named record.
  22.  
  23.      tee record                         
  24.  
  25. Copy the file named original to a new file (newfile), while printing the 
  26. contents of original on the printer.
  27.  
  28.      tee newfile <original >prn 
  29.  
  30. Take the directory, display it on the screen, save the directory to the file 
  31. named dirlist, sort the directory, and place the sorted directory in the file 
  32. named dirsort.
  33.  
  34.      dir | tee con | tee dirlist | sort > dirsort
  35.